<?php
/**
 * EventFixture
 *
 */
class EventFixture extends CakeTestFixture {

/**
 * Fields
 *
 * @var array
 */
	public $fields = array(
		'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'),
		'name' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index', 'comment' => 'Event\'s name'),
		'startdate' => array('type' => 'datetime', 'null' => true, 'default' => NULL, 'comment' => 'Event start date (if any, can be NULL).'),
		'desc' => array('type' => 'text', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => 'Event desc', 'charset' => 'utf8'),
		'limit' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 5, 'comment' => 'Place capacity limit'),
		'accepting' => array('type' => 'boolean', 'null' => false, 'default' => '1', 'comment' => 'If false, registration for this event is on hold.'),
		'active' => array('type' => 'boolean', 'null' => false, 'default' => '1', 'comment' => 'If false, it is an invisible event for all'),
		'place_id' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'comment' => 'Place where event will happen'),
		'chapter_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'comment' => 'Event\'s chapter'),
		'user_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'comment' => 'Event owner (creator)'),
		'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'name' => array('column' => array('name', 'startdate', 'accepting', 'chapter_id', 'user_id'), 'unique' => 0)),
		'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
	);

/**
 * Records
 *
 * @var array
 */
	public $records = array(
		array(
			'id' => 1,
			'name' => 1,
			'startdate' => '2012-06-12 21:04:50',
			'desc' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
			'limit' => 1,
			'accepting' => 1,
			'active' => 1,
			'place_id' => 1,
			'chapter_id' => 1,
			'user_id' => 1
		),
	);
}
